package com.softeem.work.w1;

/**
 * 项目经理类
 */
public class Manager extends Programmer{
    //奖金
    private double bonus;

    public Manager(){

    }
    public Manager(double bonus) {
        this.bonus = bonus;
    }
    public Manager(int id, String name, double salary, double bonus) {
        super(id, name, salary);
        this.bonus = bonus;
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }

    @Override
    public String toString() {
        return "Manager{" +
                "bonus=" + bonus +
                '}';
    }

    public void work(Manager manager) {
        System.out.println("工号:" + manager.getId());
        System.out.println("姓名:" + manager.getName());
        System.out.println("工资:" + manager.getSalary());
        System.out.println("奖金："+ manager.getBonus());
    }
}